#!/bin/bash

# 备份原有文件（如果存在）
if [ -f /etc/motd ]; then
    cp /etc/motd /etc/motd.bak
    echo "已备份原有 /etc/motd 文件"
fi

# 配置/etc/motd
cat > /etc/motd <<'EOF'
Authorized uses only. All activity may be monitored and reported.
EOF

echo "motd已成功配置。"
